package com.acme.logging;

import java.io.*;
import java.util.List;

class FileLogWriter extends LogWriter {

    PrintWriter out;

    FileLogWriter(String filename) throws IOException {
        File output = new File(filename);
        out = new PrintWriter((new FileOutputStream(output, true)));
    }

    @Override
    synchronized void writeLog(String log) {
        out.println(log);
    }

    @Override
    void close() {
        out.close();
    }
}
